#include "OperFun.h"
#include "equ_include/Belord_PTC_9000.h"

//请自行添加所需头文件
 OperFun_INFO OperFun_info;
 OperFun_MA OperFun_ma;
 QStandardItemModel OperFun_mode_info;

 void OperFun::Can0Data_pro(quint32 CANID,quint8 data[8])
 {

     switch (CANID)
     {
     case 0x18FFC13B:
         Belord_PTC_9000::EQ_0x18FFC13B(data);
         break;
     case 0x1801E0BF:
         Belord_PTC_9000::EQ_0x1801E0BF(data);
         break;
     case 0x1802E0BF:
         Belord_PTC_9000::EQ_0x1802E0BF(data);
         break;
     }
}


void OperFun::Can1Data_pro(quint32 CANID,quint8 data[8])
{
    switch (CANID)
    {
    case 0x1801E0BF:
        Belord_PTC_9000::EQ_0x1801E0BF(data);
        break;
    case 0x1802E0BF:
        Belord_PTC_9000::EQ_0x1802E0BF(data);
        break;
    }

}




void OperFun::RunDataProForm()
{


}
float OperFun::PressureSensor_Count(quint16 price,float X_L,float X_H,float Y_L,float Y_H)   //输入量:price，需要值Y,X_L: Y_L的X数据,X_H:Y_H的X数据,Y_L:最小转换Y数据,Y H:最大转换Y数据:
{
      return    ((price-X_L)/(X_H-X_L))*(Y_H-Y_L)+Y_L;



}
float OperFun::flowmeter_Count(quint16 price,float ratio)  //price为值,ratio仪表的流量系数
{

        return (price*60)/ratio;


}
void OperFun::rest_data_info()  //信息参数复位
{

}
void OperFun::Fault_processing()  //故障处理
{

}
void OperFun::EQ_runinfo()
 {
}
